import Vue from 'vue';
import App from './App.vue';
import router from './router';
import Cookie from './util/js.cookie';
import Api from './util/api';
import utils from './util/utils';
import './util/http.js'
import axios from 'axios';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css';    // 默认主题
// import '../static/css/theme-green/index.css';       // 浅绿色主题
import "babel-polyfill";
import store from './store';

Vue.use(ElementUI);
Vue.prototype.$axios = axios;
new Vue({
    router,
    store,
    created(){
        /* // alert(Cookie.get('sso-ticket'))
         let ssoTicket = Cookie.get('sso-ticket');
         if (!ssoTicket) {
         if (window.location.href.indexOf('sso_login') > -1) {
         console.log(window.location.href, ssoTicket)
         } else {
         let loginPage = (`http://${location.host}/sso_login`);
         setTimeout(() => {
         window.location.href = `${Api.loginSSO}?redirect=${loginPage}`;
         }, 0)
         }
         }*/

    },
    render: h => h(App)
}).$mount('#app');
